#pragma once
#ifndef _KLAS_TIMER_HPP_
#define _KLAS_TIMER_HPP_

#include "../Platform.hpp"

#ifdef KLAS_WINDOWS
#include <windows.h>
#endif

namespace klas
{
  namespace tools
  {
    //! A high fidelity, easy to use timer.
    /*! For each supported operating system, an additional timer implementation needs to be written.  
        This is platform specific.  Specifically, the ctor, restart, and getSeconds are platform specific. */
    class KLAS_API Timer
    {
    public:
      //! Creates the timer and starts it.
      Timer();

      //! Restarts the timer.
      void restart();

      //! Returns elapsed seconds since the timer was last started.
      double getSeconds();

      //! Returns elapsed milliseconds since the timer was last started.
      double getMilliseconds();

    private:
      #ifdef KLAS_WINDOWS
      LARGE_INTEGER m_start,
                    m_stop,
                    m_frequency;
      #endif
    };
  }
}
#endif